import sys
import pygame
# settings 包含窗口宽度，高度，背景颜色等信息
from settings import Settings
# Ship组件，包含初始化、放置函数
from ship import Ship
from game_functions import gf


def run_game():

    pygame.init()
    ai_settings = Settings()
    screen = pygame.display.set_mode((ai_settings.screen_width, ai_settings.screen_height))
    
    pygame.display.set_caption("外星人入侵")

    ship = Ship(screen)

    while True:

        screen.fill(ai_settings.bg_color)

        ship.blitme()
        pygame.display.flip()


run_game()